package cw.itsource.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/provider")
public class ProviderController {
    //下面的注解的意思：从application.yml中读取配置信息
    @Value("${server.port}")
    public int port;

    @GetMapping
    public String index(){
        return "恭喜，我是服务提供者，正在给你提供数据，访问端口="+port;
    }
}
